<?php

/**
 * 推文关键词model
 */
namespace backend\models;

use Yii;
use yii\db\ActiveRecord;
use yii\data\Pagination;
use yii\data\ArrayDataProvider;

class TweetKeyword extends ActiveRecord
{
    
    /**
     * 根据id获取
     */
    public static function getByTweetId($id)
    {
        if(!$id){
            return array();
        }
        $model = self::find();
        $model->select("*");
        $model->andWhere(['tweet_id'=>$id]);
        $data = $model->asArray()->one();
        return $data;
    }
 
    
}

